package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.service.ILikeMessageService;
import cn.wolfcode.trip.base.util.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("likeMessages")
public class LikeMessageController {
   @Autowired
   private ILikeMessageService likeMessageService;

   @PutMapping("/{Uid}")
    public JSONResult changeStatus(@PathVariable Long Uid){
       likeMessageService.changeStatus(Uid);
        return new JSONResult();
    }
    @GetMapping("/{Uid}")
    public Integer likeCount(@PathVariable Long Uid){
        likeMessageService.everyLikeCount(Uid);
        return null;
    }

}
